1. Field of the Invention
The present invention relates to a focus detection apparatus and to a method for controlling the same, and more particularly relates to a focus detection apparatus capable of automatic focus detection by a plurality of methods. The present invention also relates to an image capturing apparatus having a focus detection apparatus.
2. Description of the Related Art
There are conventional image capturing apparatuses capable of a plurality of types of auto-focus detection, such as auto-focus detection by phase-difference detection method (phase difference AF) and auto-focus detection by contrast evaluation method (contrast AF).
Japanese Patent Laid-Open No. 2006-146031 discloses a focus detection apparatus with which the difference between the detection result by phase difference AF and the detection result by contrast AF is stored as a correction value, and the detection result by phase difference AF is corrected with this correction value. In phase difference AF, the computation of the defocus amount is premised on a phase-difference detection sensor being attached at an assumed position, so error may occur in the detection result if the attachment accuracy should deviate from the ideal value due to manufacturing error, temporal change, or the like. With Japanese Patent Laid-Open No. 2006-146031, this error is corrected by utilizing a detection result by contrast AF using an image signal, which improves the detection accuracy of phase difference AF.
With the focus detection apparatus disclosed in Japanese Patent Laid-Open No. 2006-146031, phase difference AF is executed by moving the focus lens to the focal position detected by contrast AF (the focus lens position at which the contrast evaluation value reaches its maximum (peak position)). The difference between the focus lens position corresponding to the defocus amount detected at the peak position, and the peak position detected by contrast AF is obtained as a correction value.
However, with this method for obtaining a correction value, since the focus lens is driven a number of times after the detection of the peak position, there is the risk that driving tolerance will accumulate every time the lens is driven, and the accuracy of the correction value will suffer. This will be described in greater detail through reference to FIG. 5.
FIG. 5 shows an example of the relation between contrast AF operation and the contrast evaluation value. A contrast evaluation value drive 503 indicates the drive operation of the focus lens for searching for the peak value of the contrast evaluation value. The contrast evaluation value drive 503 is commenced at a focus lens position 500, and the focus lens is driven in a specific direction while a contrast evaluation value is found for every time the lens position changes by a specific amount. In FIG. 5, the focus lens position at which the contrast evaluation value was found is indicated by a broken line. A stopping position 507 is the position at which the drive of the focus lens is stopped, assuming that the peak is detected with the focus lens positions 504 to 506. Also, a focus drive 508 is an operation of driving the focus lens in the opposite direction from the stopping position 507 to a peak position 501.
That is, the focus lens has already separated from the peak position 501 at the point when it is determined at a focus lens position 506 that the peak position of the contrast evaluation value has been passed. In Japanese Patent Laid-Open No. 2006-146031, the focus drive 508 is performed in order to obtain a phase difference AF detection result at the peak position 501. However, the focus lens position after the focus drive 508 has the width of a driving tolerance 509 with respect to the peak position 501. Therefore, the detection result by phase difference AF for obtaining a correction value is a result with respect to the value of the peak position 501 within the range of the driving tolerance 509. However, the correction value is computed using this as a detection result with respect to the peak position 501, so the decrease in the accuracy of the correction value is particularly great when using an image capturing lens with a large driving tolerance for the focus lens, and a satisfactory correction may not be obtained.